import React from 'react';
import { Tooltip } from 'antd';
import './AppContainer.less';

const BlockChecbox = ({ onChange, list }) => (
  <div className="BlockColor" >

    {list.map(item => {
      return <Tooltip title={item.title} key={item.key}>
        <div className="item" style={{ background: item.key }} onClick={() => onChange(item.key)}>
        </div>
      </Tooltip>
    }
    )}
  </div>
);

export default BlockChecbox;
